import React from 'react'
import './Item.css'
export default function Item({ todo: { id, todoName, isDone }, xg }) {
  return (
    <li>
      <label>
        <input
          type="checkbox"
          checked={isDone}
          onChange={() => {
            xg(id)
          }}
        />
        <span className={isDone ? 'done' : ''}>{todoName}</span>
      </label>
      <button className="btn btn-danger">删除</button>
    </li>
  )
}
